Skip to content

Documentation for Radius + Flux integration - #1408

Merged
willdavsmith merged 6 commits into
radius-project:edgefrom
willdavsmith:willdavsmith/gitops-flux-docs
Apr 1, 2025
Merged

willdavsmith merged 6 commits into
radius-project:edgefrom
willdavsmith:willdavsmith/gitops-flux-docs

Conversation

@willdavsmith

@willdavsmith willdavsmith commented Mar 24, 2025 •

Copy link
Copy Markdown
Contributor

Thank you for helping make the Radius documentation better!

Please follow this checklist before submitting:

  • Read the contribution guide
  • Commands include options for Linux, MacOS, and Windows within codetabs
  • New file and folder names are globally unique
  • Page references use shortcodes instead of markdown or URL links
  • Images use HTML style and have alternative text
  • Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:

Description

Issue reference

Signed-off-by: willdavsmith <willdavsmith@gmail.com>
1. This is the second step, and will be displayed with a 2 in the docs.
1. This is the third step, and will be displayed with a 3.
1. This is the first step of a process.
```

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo that I came across

Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Signed-off-by: willdavsmith <willdavsmith@gmail.com>

@brooke-hamilton brooke-hamilton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice docs. 📜 Small suggestions.


This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), a popular GitOps tool. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}).

## Overview

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section contains the Radius configuration instead of an overview. How about renaming this section to "Radius Setup" or "Radius Configuration" and have a brief "Overview" section of one or two sentences that describes how Radius needs configuration files added and Flux needs to be configured to connect to the repo where Radius config files are stored?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just fold this all into one Flux How-To guide under a parent GitOps section?

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

@willtsai willtsai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, great comprehensive content! I have some in line suggestions and also request that you organize the content into a set of how-to guides, similar to how the Dapr guides are organized: docs/content/guides/author-apps/dapr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this for now, we usually don't add "coming soon" style content like this to our tech documentation

tags: ["flux", "gitops", "continuous", "delivery", "deployment"]
---

This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), a popular GitOps tool. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), a popular GitOps tool. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}).
This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), an open-source GitOps tool that's also part of the CNCF. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}).


This guide provides an overview of how to integrate Radius with [Flux](https://fluxcd.io/), a popular GitOps tool. It covers the installation and configuration of Flux, as well as how to deploy your Radius applications using Flux. For a guided tutorial, check out the [Radius + Flux Tutorial]({{< ref "tutorials/gitops-flux" >}}).

## Overview

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines +43 to +66
### Install the Flux CLI

1. Follow the [Flux CLI installation instructions](https://fluxcd.io/docs/installation/#install-the-flux-cli) to install the Flux CLI on your local machine.

1. Verify the installation by running:

```bash
flux version
```

### Install the Flux Source Controller

The only required component for this integration is the Flux source controller. This component is responsible for managing the Git repository and syncing it with your Kubernetes cluster.

1. Install Flux in your Kubernetes cluster:

```bash
flux install --namespace=flux-system --version=latest --components=source-controller --network-policy=false
```

{{< alert title="⚠️ Network Policy" color="warning" >}}
The `--network-policy=false` flag is specified here to disable the network policy for the Flux source controller, since by default access to Flux components is restricted. For a production setup, you can instead remove this flag and configure the network policy to allow `radius-system` namespace access to the source controller. This will ensure that the source controller can communicate with your Git repository and sync changes effectively.
For more information on the network policy, see the [Flux documentation](https://fluxcd.io/flux/installation/configuration/optional-components/#network-policies).
{{< /alert >}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's all Flux-specific instructions, can we remove this and just link a pointer to the Flux documentation for these steps? kind of like how we just call out that the user needs to have dapr installed in their cluster and point them to the dapr docs: https://docs.radapp.io/tutorials/dapr/#prerequisites

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, I kept the alert though because the user most likely will not have this flag enabled so I think it'd be good to call it out. In the future we could write a "flux setup" docs page with the right network policy.

Comment on lines +68 to +70
### Configure Flux

Now that you have installed the Flux CLI and the source controller, you can use Flux as you do today to manage your Git repository, such as by using the [`flux create source git`](https://fluxcd.io/flux/cmd/flux_create_source_git/) CLI command to associate your Git repository with the Flux source controller.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing here, just point to Flux, or perhaps even add this step to the troubleshooting section, e.g. If your changes in the repo aren't being detected by Flux, make sure you have configured it properly per the instructions here.

Comment on lines +59 to +67
## Step 3: Initialize a Radius Environment and Application

1. Initialize a new Radius Environment with [`rad init`]({{< ref rad_initialize >}}):

```bash
rad init
```

When asked if you want to create a new application select "Yes". This will create a new file named `app.bicep` in your directory where your application will be defined. It will also create a [`bicepconfig.json`]({{< ref "/guides/tooling/bicepconfig/overview" >}}) file that will contain the necessary setup to use Radius types with Bicep.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this and just add it as an additional item in prereqs:

  • [Radius environment]({{< ref "installation#step-3-initialize-radius" >}})
  • [Radius local-dev Recipes]({{< ref howto-dev-recipes >}})

Comment on lines +69 to +79
## Step 3: Prepare Application for Deployment by Flux

1. Open `app.bicep` and see the scaffolded application created by `rad init`:

{{% rad file="snippets/1-app.bicep" embed=true %}}

1. Update the `app.bicep` file. We want to link the default environment and specify an application to deploy Radius resources to.

{{% rad file="snippets/2-app-with-environment.bicep" embed=true %}}

This Radius application is now ready to be deployed. Instead of using the `rad deploy` CLI command, we will use Flux to detect changes in the Git repository and deploy the application automatically.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this its own step, and instead of asking the user to use the scaffolded default app, have them just create a new app.bicep with the bicep snippet available for them to follow. See example here: https://docs.radapp.io/guides/author-apps/dapr/how-to-dapr-sidecar/

git push origin main
```

## Step 4: Configure Flux to Manage Your Application

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these Flux specific steps are fine to include as they are core to the Flux+Radius workflow

```

Congratulations! You have successfully integrated Radius with Flux for GitOps. You can now manage your Radius applications using Git as the single source of truth.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a clean up step for the user to clean up the Radius stuff they created for this how-to, see https://docs.radapp.io/guides/author-apps/dapr/how-to-dapr-sidecar/#cleanup


## Next steps

Check out the [Radius + GitOps overview]({{< ref "guides/deploy-apps/gitops/overview" >}}) for more detailed information on how to use Radius with GitOps.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Check out the [Radius + GitOps overview]({{< ref "guides/deploy-apps/gitops/overview" >}}) for more detailed information on how to use Radius with GitOps.
Check out the [Radius + GitOps overview]({{< ref "guides/deploy-apps/gitops/overview" >}}) for more information on how to use Radius integrates with GitOps solutions.

@brooke-hamilton brooke-hamilton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

Comment on lines +26 to +28
To enable this integration, you need to create a `radius-config.yaml` file in your Git repository. This file specifies the Bicep files to deploy and their parameters.

Here is an example showing all of the options for the `radius-config.yaml` file:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To enable this integration, you need to create a `radius-config.yaml` file in your Git repository. This file specifies the Bicep files to deploy and their parameters.
Here is an example showing all of the options for the `radius-config.yaml` file:
To enable this integration, you need to create a `radius-gitops-config.yaml` file in your Git repository. This file specifies the Bicep files to deploy and their parameters.
Here is an example showing all of the options for the `radius-gitops-config.yaml` file:

willdavsmith added a commit to radius-project/radius that referenced this pull request Mar 31, 2025
# Description

* Add Radius Flux controller and tests
* Update test workflows to install and use Flux and Gitea
* Add bicep container and changes to allow for Bicep to run server-side
in `controller` pod

Note: I expect the functional tests to fail for this PR because I'm
updating the functional test workflow. Here's a link to a successful
action run:
https://github.com/radius-project/radius/actions/runs/14074009492

Design PR: radius-project/design-notes#79
Docs PR: radius-project/docs#1408

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).
- This pull request adds or changes features of Radius and has an
approved issue (issue link required).
- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: #6689

## Contributor checklist
Please verify that the PR meets the following requirements, where
applicable:

- An overview of proposed schema changes is included in a linked GitHub
issue.
    - [ ] Yes
    - [x] Not applicable
- A design document PR is created in the [design-notes
repository](https://github.com/radius-project/design-notes/), if new
APIs are being introduced.
    - [x] Yes
    - [ ] Not applicable
- The design document has been reviewed and approved by Radius
maintainers/approvers.
    - [x] Yes
    - [ ] Not applicable
- A PR for the [samples
repository](https://github.com/radius-project/samples) is created, if
existing samples are affected by the changes in this PR.
    - [ ] Yes
    - [x] Not applicable
- A PR for the [documentation
repository](https://github.com/radius-project/docs) is created, if the
changes in this PR affect the documentation or any user facing updates
are made.
    - [x] Yes
    - [ ] Not applicable
- A PR for the [recipes
repository](https://github.com/radius-project/recipes) is created, if
existing recipes are affected by the changes in this PR.
    - [ ] Yes
    - [x] Not applicable

---------

Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Signed-off-by: willdavsmith <willdavsmith@gmail.com>

@brooke-hamilton brooke-hamilton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@willtsai willtsai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the edits, looking good so far! My last piece of feedback is to bring this GitOps Overview page back (it was in your previous commit) - 06ba960#diff-b714710b9e0d5608c922f58f9232cf560c965f9a825398bc7032c755a45289de

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

@willtsai willtsai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@willdavsmith
willdavsmith merged commit cd06c0c into radius-project:edge Apr 1, 2025
@willtsai willtsai mentioned this pull request Apr 1, 2025
6 tasks done
willdavsmith added a commit to radius-project/radius that referenced this pull request Apr 24, 2025
# Description

* Add Radius Flux controller and tests
* Update test workflows to install and use Flux and Gitea
* Add bicep container and changes to allow for Bicep to run server-side
in `controller` pod

Note: I expect the functional tests to fail for this PR because I'm
updating the functional test workflow. Here's a link to a successful
action run:
https://github.com/radius-project/radius/actions/runs/14074009492

Design PR: radius-project/design-notes#79
Docs PR: radius-project/docs#1408

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).
- This pull request adds or changes features of Radius and has an
approved issue (issue link required).
- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: #6689

## Contributor checklist
Please verify that the PR meets the following requirements, where
applicable:

- An overview of proposed schema changes is included in a linked GitHub
issue.
    - [ ] Yes
    - [x] Not applicable
- A design document PR is created in the [design-notes
repository](https://github.com/radius-project/design-notes/), if new
APIs are being introduced.
    - [x] Yes
    - [ ] Not applicable
- The design document has been reviewed and approved by Radius
maintainers/approvers.
    - [x] Yes
    - [ ] Not applicable
- A PR for the [samples
repository](https://github.com/radius-project/samples) is created, if
existing samples are affected by the changes in this PR.
    - [ ] Yes
    - [x] Not applicable
- A PR for the [documentation
repository](https://github.com/radius-project/docs) is created, if the
changes in this PR affect the documentation or any user facing updates
are made.
    - [x] Yes
    - [ ] Not applicable
- A PR for the [recipes
repository](https://github.com/radius-project/recipes) is created, if
existing recipes are affected by the changes in this PR.
    - [ ] Yes
    - [x] Not applicable

---------

Signed-off-by: willdavsmith <willdavsmith@gmail.com>
vishwahiremat pushed a commit to vishwahiremat/docs that referenced this pull request Jun 10, 2025
* Docs for GitOps + Flux

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* spellcheck

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* spelling

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* PR

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* PR

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* PR

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

---------

Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>
vishwahiremat pushed a commit to vishwahiremat/docs that referenced this pull request Aug 13, 2025
* Docs for GitOps + Flux

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* spellcheck

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* spelling

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* PR

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* PR

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* PR

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

---------

Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>

This branch was previously deployed

1 inactive deployment
edge — 172cc92d Deployed Apr 1, 2025 by willdavsmith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants